import java.util.Random;
import java.util.Scanner;

public class demo7 {
    public static void main(String[] args) {
        Random random=new Random();
        int x= random.nextInt(100)+1;
        int i=0;
        while (true){
            if (i<4) {
                i++;
                Scanner scanner=new Scanner(System.in);
                System.out.println("请输入数字a");
                int a= scanner.nextInt();
                if (a == x) {
                    if (i==1) {
                        System.out.println("你真厉害,一次就猜对了！");
                    }else System.out.println("你很聪明,猜对了!");
                  break;
                }
                else if (a<x) {
                    System.out.println("猜小了");
                }
                else
                    System.out.println("猜大了");
            }
            else {
                System.out.println("笨蛋你猜了那么多次！");
                 break;
            }
            }
    }
}
